package com.kgc.basic.remote;

import com.kgc.basic.pojo.Account;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

public interface AccountRemote {

    @RequestMapping("/selectAccountByPage")
    @ResponseBody
    ResponseMsg selectAccountByPage(@RequestBody Map<String, Object> map);

    @RequestMapping("/insertAccount")
    @ResponseBody
    ResponseMsg insertAccount(@RequestBody Account account);

    @RequestMapping("/updateAccount")
    @ResponseBody
    ResponseMsg updateAccount(@RequestBody Account account);

    @RequestMapping("/deleteAccount")
    @ResponseBody
    ResponseMsg deleteAccount(@RequestParam("id") int id);

    //校验编码是否重复
    @RequestMapping("selectAccountByCode")
    @ResponseBody
    ResponseMsg selectAccountByCode(@RequestParam("code") String code);

    @RequestMapping("selectAllAccount")
    ResponseMsg selectAllAccount();
}
